//
//  RecListenElseTableViewCell.m
//  TravelEveryDay
//
//  Created by dlios on 15-10-23.
//  Copyright (c) 2015年 com.lanou3g. All rights reserved.
//

#import "RecListenElseTableViewCell.h"

@implementation RecListenElseTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _image = [[UIImageView alloc] initWithFrame:CGRectMake(10 * WIDTH, 20 * HEIGHT, 80 * WIDTH, 80 * WIDTH)];
        _image.layer.masksToBounds = YES;
        _image.layer.cornerRadius = 40 * WIDTH;
        [self.contentView addSubview:_image];
        
        
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(100 * WIDTH, 20 * HEIGHT, 250 * WIDTH, 40 * HEIGHT)];
        _titleLabel.font = [UIFont boldSystemFontOfSize:20];
        [self.contentView addSubview:_titleLabel];
        
        
        _subLabel = [[UILabel alloc] initWithFrame:CGRectMake(100 * WIDTH, 50 * HEIGHT, 250 * WIDTH, 50 * HEIGHT)];
        _subLabel.font = [UIFont systemFontOfSize:16.];
        [_subLabel setNumberOfLines:2];
        _subLabel.alpha = 0.6;
        [self.contentView addSubview:_subLabel];
    }
    return self;
}
-(void)getData:(RecListenModel *)model
{
    [_image sd_setImageWithURL:[NSURL URLWithString:model.Cover] placeholderImage:PLACEHOLDERIMAGE];
    _titleLabel.text = model.Title;
    _subLabel.text = model.Summary;
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
